package com.authsphere.security.account.api.lock;

import java.util.List;

/**
 * @program: AuthSphere
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/14 09:34
 **/
public interface LockoutRepository {

    /**
     * save lock account
     * @param lockedAccount lockedAccount
     */
    void save(LockedAccount lockedAccount);

    /**
     * update lock account
     * @param lockedAccount lockedAccount
     */
    void update(LockedAccount lockedAccount);

    /**
     * find lock account
     * @param username username
     * @return LockedAccount
     */
    LockedAccount findByUsername(String username);

    /**
     * delete lock account
     * @param username username
     */
    void deleteByUsername(String username);

    /**
     * get locked account list
     * @param username username
     * @return LockedAccount
     */
    List<LockedAccount> getLockedAccounts(String username);

    /**
     * find all locked account list
     * @return
     */
    List<String> findAllLockedAccounts();
}
